home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 03-04.C < prev    next >
Text File  |  1992-01-31  |  509b  |  31 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. void main()
  8. {
  9.    int old_mode;
  10.    int new_mode;
  11.  
  12.    old_mode = fg_getmode();
  13.    new_mode = fg_bestmode(80,25,1);
  14.  
  15.    if (new_mode < 0) {
  16.       printf("This program requires\n");
  17.       printf("an 80-column display.\n");
  18.       exit(1);
  19.       }
  20.  
  21.    fg_setmode(new_mode);
  22.    fg_cursor(0);
  23.  
  24.    fg_setcolor(15);
  25.    fg_text("Hello, world.",13);
  26.    fg_waitkey();
  27.  
  28.    fg_setmode(old_mode);
  29.    fg_reset();
  30. }
  31.